<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Blog后台</title>
    <link rel="stylesheet" th:href="@{/css/bootstrap.css}">
    <link rel="stylesheet" th:href="@{/css/amazeui.css}">
    <script th:src="@{/js/jquery.js}"></script>
    <script th:src="@{/js/bootstrap.js}"></script>
</head>
<body style="background-color:#eee;">

<div th:replace="~{commons/admin/topbar::top-bar}"></div>


<div class="row">
    <!--    引入共有侧边栏-->
    <div th:replace="~{commons/admin/leftbar::left-bar}"></div>

    <!--所有文章页面-->
    <div class="col-xs-12 col-sm-9 col-md-10 pull-right" style="background-color:#FFFFFF;margin-top: 55px;">
        <div class="row bg-info text-center">
            <h4>检索文章结果</h4>
        </div><br>
        <div class="container-fluid" style="min-height: 800px;">
            <div class="row">
            </div>
            <div class="row">
                <div class="table-responsive">
                    <table class="table table-bordered">
                        <thead>
                        <tr>
                            <th>标题</th>
                            <th>作者</th>
                            <th>类型</th>
                            <th>标签</th>
                            <th>发布时间</th>
                            <th>最后更改时间</th>
                            <th>喜欢数</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr th:each="article : ${articles}">
                            <td>
                                <a th:href="@{/articlePage/}+@{${article.getId()}}" target="_blank" th:text="${article.getArticleTitle()}"></a>
                            </td>
                            <td th:text="${article.getAuthor()}"></td>
                            <td>
                                <a th:href="@{/articleType/}+@{${article.getArticleType()}}" target="_blank" th:text="${article.getArticleType()}"></a>
                            </td>
                            <td th:text="${article.getArticleTags()}"></td>
                            <td th:text="${article.getPublishDate()}"></td>
                            <td th:text="${article.getUpdateDate()}"></td>
                            <td th:text="${article.getLikes()}"></td>
                            <td>
                                <a class="btn-sm btn-primary" th:href="@{/admin/toUpdateArticle/}+@{${article.getId()}}">更新</a>
                                &nbsp;|&nbsp;
                                <a class="btn-sm btn-danger" th:href="@{/admin/deleteArticle/}+@{${article.getId()}}">删除</a>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                    <ul class="am-pagination">
                        <li><a th:href="@{/admin/articleSearch/}+@{${prev}}">&laquo; 上一页</a></li>
                        <li><a th:href="@{/admin/articleSearch/}+@{${next}}">下一页 &raquo;</a></li>
                        <li><a th:href="@{/admin/allArticle}+@{/1}">返回</a></li>
                    </ul>
                    共找到<span style="font-weight: 400;font-size: 18px;color: #4d99de" th:text="${articleSize}"></span> 名用户
                </div>
            </div>
        </div><br>
        <div class="pull-right"><a href="" target="_blank">Power By Wangzz</a>&nbsp;&nbsp;</div>    </div>

</div>


</body>
</html>